//package com.ruiysoft.sms.handler;
//
//import com.ruiysoft.sms.entity.SmsResult;
//import com.ruiysoft.sms.service.SmsService;
//import java.util.HashMap;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.http.MediaType;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RestController;
//import org.springframework.web.reactive.function.BodyInserters;
//import org.springframework.web.reactive.function.server.ServerRequest;
//import org.springframework.web.reactive.function.server.ServerResponse;
//import org.springframework.web.reactive.function.server.ServerResponse.BodyBuilder;
//import reactor.core.publisher.Mono;
//import reactor.util.Logger;
//import reactor.util.Loggers;
//
//@RestController
//public class SmsHandler
//{
//  private Logger logger = Loggers.getLogger(SmsHandler.class);
//  private final SmsService smsService;
//
//  @Autowired
//  public SmsHandler(SmsService smsService)
//  {
//    this.smsService = smsService;
//  }
//
//  public Mono<ServerResponse> helloCity(ServerRequest request) {
//    return ServerResponse.ok().contentType(MediaType.APPLICATION_PROBLEM_JSON)
//      .body(BodyInserters.fromObject("Hello, City!"));
//  }
//
//  @PostMapping({"/sendVerifyCode"})
//  public Mono<SmsResult> sendVerifyCode(@RequestBody HashMap<String, String> param)
//  {
//    return this.smsService.sendVerifyCode((String)param.get("phoneNumber"));
//  }
//
//  @PostMapping({"/checkVerifyCode"})
//  public Mono<SmsResult> checkVerifyCode(@RequestBody HashMap<String, String> param)
//  {
//    return this.smsService.checkVerifyCode((String)param.get("phoneNumber"), (String)param.get("vCode"));
//  }
//}